/*
 * $Id: EmployeeEqualsTest.java 81 2012-12-13 16:34:51Z Denis.Skalsky@gmail.com $		
 */
package com.globallogic.skalskyy.javabasic.valstaff;

import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.Test;

public class EmployeeEqualsTest extends  StaffTestFixture {
	
	private Employee employee = new SoftwareEngineer();
	
	@Before
	public void setUp() {
		super.setUp();
		
		this.employee.setFirstName(this.DenysSkalskyy.getFirstName());
		this.employee.setSecondName(this.DenysSkalskyy.getSecondName());
		this.employee.setPosition(this.DenysSkalskyy.getPosition());
		this.employee.setDateOfBirth(this.DenysSkalskyy.getDateOfBirth());
	}

	@Test
	public void testDifferentFirstName() {
		this.employee.setFirstName("Ivan");
		
		assertEquals(false, this.employee.equals(this.DenysSkalskyy));
	}
	
	@Test
	public void testDifferentSecondName() {
		this.employee.setSecondName("Popov");
		
		assertEquals(false, this.employee.equals(this.DenysSkalskyy));
	}

	@Test
	public void testDifferentPosition() {
		this.employee.setPosition("junior software engineer");
		
		assertEquals(false, this.employee.equals(this.DenysSkalskyy));
	}
	
	@Test
	public void testDifferentDateOfBirth() {
		this.employee.setDateOfBirth("31 December");
		
		assertEquals(false, this.employee.equals(this.DenysSkalskyy));
	}	
}
